<?php
/**
* @package   auto_occasion
* @subpackage formule
* @author    your name
* @copyright 2011 your name
* @link      http://www.yourwebsite.undefined
* @license    All rights reserved
*/

class optionFormuleZone extends jZone {
    protected $_tplname='optionFormule.zone';

    protected function _prepareTpl(){
        
        jClasses::inc("formule~formuleSrv");
        jClasses::inc("formule~formuleOptionSrv");

        $iFormuleId = $this->param('formuleId', 0);
        $ArrayTmp = array() ;

        $toOptions      = formuleSrv::liste_option();

        foreach ($toOptions as $oOption) {
            $oOption->toChoises = formuleOptionSrv::getChoiseByOptionId($oOption->id_option_formule) ;
            $ArrayTmp[] = $oOption ;
        }

        $toOptions = $ArrayTmp ;

        $this->_tpl->assign('toOptions', $toOptions);
    }
}
